import request from '@/utils/request'

// 获取WMS其他出库单
export function getOtherOutboundInfo(query) {
  return request({
    url: '/other-outbound',
    method: 'get',
    params: query
  });
}

// 获取NCC其他出库单
export function getOtherOutboundNccInfo(query) {
  return request({
    url: '/other-outbound/ncc',
    method: 'get',
    params: query
  });
}


// +++废除其他出库单
export function deleteOtherOutbound(cgeneralhid, query) {
  return request({
    url: `/other-outbound/${cgeneralhid}`,
    method: 'DELETE',
    params: query
  });
}


// 修改NCC其他出库单
export function createOtherOutboundUpdate(data) {
  return request({
    url: '/other-outbound/update',
    method: 'post',
    data: JSON.stringify(data) // 将传入的数据转换为JSON字符串后作为请求体发送
  });
}


// 对NCC其他出库单进行签字
export function updateOtherOutbound(cgeneralhid, data) {
  return request({
    url: `/other-outbound/${cgeneralhid}`,
    method: 'PUT',
    data
  });
}

// 新增其他出库单据
export function createOtherOutbound(data) {
  return request({
    url: '/other-outbound',
    method: 'post',
    data: JSON.stringify(data) // 将传入的数据转换为JSON字符串后作为请求体发送
  });
}

// WMS确认NCC其他出库单
export function createOtherOutboundConfirm(data) {
  return request({
    url: '/other-outbound/confirm',
    method: 'post',
    data: JSON.stringify(data) // 将传入的数据转换为JSON字符串后作为请求体发送
  });
}

// 其他出库取消提取
export function createOtherOutboundBack(headerid) {
  return request({
    url: `/other-outbound/back/${headerid}`,
    method: 'post',
  });
}

// 其他出库WMS下账
export function createOtherOutboundInventory(headerid) {
  return request({
    url: `/other-outbound/inventory/${headerid}`,
    method: 'post',
  });
}